/**
 * 描述：首页职能-职位分类弹出框
 */
<style lang="scss" scoped>
  @import 'src/styles/common';
  @import 'src/components/common/jobClassify/index.less';
</style>
<template>
    <Spin size="large">
      <transition name="fade" mode="out-in">
        <div class="kuang" style="width:600px;border-top:0;height:400px;">
            <div class="inner">
              <div class="right" style="width: 100%;float: none !important;">
                  <div class="topTwo">
                    <a v-for="(item, index) in second" :key="index" :class="{cur: selectSecond == index}" @click="clickSecond(index)">{{item.label}}</a>
                    <div class="clear"></div>
                  </div>
                <div class="clear"></div>
                  <div class="topThree">
                    <span v-for="(item, index) in third" :key="index" @click="clickThird(item)">{{item.label}}</span>
                    <div class="clear"></div>
                  </div>
              </div>
            </div>
          </div>
      </transition>
    </Spin>
</template>
<script>
    export default {
        name: 'HomeJobClassify',
        data () {
            return {
                second: [],
                third: [],
                selectSecond: null
            };
        },
        computed: {
        },
        props: {
          itemData: {
            type: Object,
            default: {}
          }
        },
        created () {
          this.second = this.itemData.children;
        },
        methods: {
          clickSecond (index) {
            this.selectSecond = index;
            this.third = [];
            if (this.second[index].children) this.third = this.second[index].children;
          },
          clickThird (item) {
            this.$emit('homeJobData', item);
          }
        }
    };
</script>
